home *** CD-ROM | disk | FTP | other *** search
- #include <Types.h>
- #include <Memory.h>
- #include <Quickdraw.h>
- #include <Fonts.h>
- #include <Events.h>
- #include <Menus.h>
- #include <TextEdit.h>
- #include <MacWindows.h>
- #if UNIVERSAL_INTERFACES_VERSION >= 0x0330
- #include <ControlDefinitions.h>
- #endif
- #include <Dialogs.h>
- #include <OSUtils.h>
- #include <ToolUtils.h>
- #include <Devices.h>
- #include <StandardFile.h>
- #include <Movies.h>
- #include <Sound.h>
- #include <QuickTimeComponents.h>
- #include <ImageCompression.h>
- #include <Resources.h>
- #include <FixMath.h>
- #include <stdio.h>
- #include <OpenTransport.h>
- #include <SIOUX.h>
-
- #include "SortFrames.h"
- #include "Promiscuity.h"
-
- bool gAllDomains;
-
- int main( void )
- {
- int err = 0;
-
- SIOUXSettings.asktosaveonclose = false;
- SIOUXSettings.columns = 120;
- SIOUXSettings.rows = 40;
-
- err = InitOpenTransport();
- if ( err )
- {
- printf("Error Initializing OpenTransport %d\n", err );
- return 0;
- }
-
-
- char theDeviceName[256];
- printf( "Starting...\n" );
- printf( "Enter device name (enet1, radio0, etc):\n" );
- scanf( "%s", theDeviceName );
- if ( theDeviceName[0] == 0 ) return(0);
-
- char allOrSome[32];
- printf( "SomeDomains=0, AllDomains=1:\n");
- scanf( "%s", allOrSome );
- if ( allOrSome[0] == '1' )
- gAllDomains = true;
-
- err = InitializeResponses();
- if ( err )
- {
- printf("Error Initializing the response port %d\n", err );
- return 0;
- }
-
- printf("Opening device %s\n", theDeviceName );
- err = initPromiscuity( theDeviceName );
- if ( err )
- {
- printf("Error Initializing promiscuous mode %d\n", err );
- return 0;
- }
-
- EventRecord theEvent;
-
- while( true )
- {
- if ( WaitNextEvent( everyEvent, &theEvent, 0, 0 ) )
- {
- if ( theEvent.what == keyDown )
- break;
-
- SIOUXHandleOneEvent( &theEvent );
- }
-
- idlePromiscuity();
- }
-
- termPromiscuity();
-
- (void) CleanupResponses();
-
- return 0;
- }
-